package com.swust.mapper;

import com.swust.po.Product;
import com.swust.vo.QueryVo;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Objects;

public interface ProductMapper {
    /**
     * 根据pid查询商品
     * @param pid
     * @return 商品信息
     */
    Product findByPid(int pid);

    List<Product> findBycategory(String category);

    List<Product> selectByCondition(QueryVo vo);

    List<Product> seletByMap(HashMap<String, Object> map);

    List<Product> seletByParas(@Param("price") double price, @Param("category") String category);

    int selectByCount();
}
